<template>
    <fieldset>
        <legend>一个父组件</legend>
        <h1>两个父组件</h1>
        <child :g="gift" @re="get"/>
        <child2/>
        <insert>
            <template v-slot:header>
                <!-- <header>标题</header>  -->
            </template>
            <template v-slot:main>
                <main>主体</main>
            </template>
            <template v-slot:footer>
                <footer>底部</footer>  
            </template> 
            <template v-slot="{o}">
                <h1>哈哈哈:{{o.nickname}}</h1> 
            </template>   
        </insert>
    </fieldset>
</template>

<script>
import child from "./child"
import child2 from "./child2.vue";
import insert from "./insert.vue";


export default {
    components: {
    child,
    child2,
    insert
},
    data () {
        return {
            gift: "一个擎天柱"
        }
    },
    methods: {
        get(input) {
            console.log(input);
        }
    }
}
</script>